import os
import os.path
import time

filePath="/home/lcp/LCP_LAB/FPGA-tools/pure-number.txt"

def is_pure(number):
    for i in range(2, number):
        if number%i==0:
            return False
    else:
        #print(" %d is a prime number！" % number)
        return True

end=10**4
start=time.clock()
with open(filePath, 'w', encoding='utf-8') as f:
   
    for k in range(3,end):
        
        if(is_pure(k)):
            f.write(str(k)+'\n')

end=time.clock()

print("time used = ",end-start)